package cn.edu.henu.team.bean;

public class clinicAvg implements Comparable<clinicAvg> {

    private String name;
    private double avg;
    private String kinds;
    private String phone;
    private String address;
    private double sum;
    private double score;

    public clinicAvg(String name, double avg, String kinds, String phone, String address, double sum, double score) {
        this.name = name;
        this.avg = avg;
        this.kinds = kinds;
        this.phone = phone;
        this.address = address;
        this.sum = sum;
        this.score = score;
    }

    @Override
    public int compareTo(clinicAvg o) {
        return  o.getAvg() - this.getAvg() > 0 ? 1 : ((this.getAvg() == o.getAvg()) ? 0 :-1);   //降序：返回值为1 或-1 升序改变变量位置即可
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getAvg() {
        return avg;
    }

    public void setAvg(double avg) {
        this.avg = avg;
    }

    public String getKinds() {
        return kinds;
    }

    public void setKinds(String kinds) {
        this.kinds = kinds;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public double getSum() {
        return sum;
    }

    public void setSum(double sum) {
        this.sum = sum;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }
}
